package com.peter.design.pattern.singleton.hungry;

/**
 * @Auther: 肖冬
 * @Date: 2020/7/24 15:32
 * @Description: 饿汉式静态块单例
 */
public class HungryStaticSingleton {
    private static final HungryStaticSingleton hungrySingleton;

    static {
        hungrySingleton = new HungryStaticSingleton();
    }

    private HungryStaticSingleton(){}

    public static HungryStaticSingleton getInstance(){
        return  hungrySingleton;
    }

}
